<?php
/**
 * Created by PhpStorm.
 * User: czm
 * Date: 2019-07-24
 * Time: 10:43
 */
namespace app\index\controller;

use think\console\command\make\Controller;
use think\Db;

class Oneself extends Controller
{
    public function index()
    {

    }

    public function notice()
    {
        $list = Db::name('notice')->order('id desc')->select();
        $a = $list['state'];
        if ($a == 0){
            return ;
        }
        return json_encode($list);
    }

//    public function businessLogin()
//    {
//        $id = input('post.');
//        $b = $id['phone'];
//        $a = Db::name('business')->where('phone',$b)->find();
//        if ($a)
//        {
//            $dat = ['code' => 436, 'msg' => '不是商家'];
//            return json_encode($dat);
//        }else{
//            $dat = ['code' => 200, 'msg' => '登录成功'];
//            return json_encode($dat);
//        }
//    }
}